package main

import "fmt"

type Person struct {
	Name string
	Age  int
}

/*
*
基础语法
*/
func main() {

	var p1 Person
	p1.Name = "张三"
	p1.Age = 18

	fmt.Println("p1=", p1)

	var p2 = Person{Name: "Tome", Age: 20}
	fmt.Println("p2=", p2)

	p3 := Person{Name: "Aaron", Age: 32}
	fmt.Println("p3 =", p3)

	p5 := Person{"Aaron", 32}
	fmt.Println("p5 =", p5)

	p4 := struct {
		Name string
		Age  int
	}{Name: "匿名", Age: 33}

	fmt.Println("p4=", p4)
}
